cmake_minimum_required(VERSION 3.15)

project(lcd_demo C)

find_package(PkgConfig REQUIRED)
pkg_check_modules(cairo REQUIRED IMPORTED_TARGET cairo)

set(LCD_SRCS
    lib/LCD/LCD.c
)

set(SRCS
    src/main.c
)

file(COPY pic/ DESTINATION ${CMAKE_BINARY_DIR}/pic/)

include_directories(lib/Config)
include_directories(lib/LCD)

add_definitions(-DUSE_WIRINGPI_LIB)

add_executable(${PROJECT_NAME} ${LCD_SRCS} ${SRCS})

target_link_libraries(${PROJECT_NAME}
    m
    wiringPi
    PkgConfig::cairo
)